#pragma once

#include <ctime>
#define WIN32_LEAN_AND_MEAN
#include "windows.h"

class Time
{
	unsigned int totalFrames;	// Counts the number of frames since the game started.
	unsigned int fps;			// How many frames per second the game is running at.
	float fpsTimer;				// How much Time has passed since lase FPS check.

	float deltaTime;	// Stores the ellapsed time between frames.
	float prevTime;		// Stores the start time of the previous frame. Used to calculate deltaTime.
	

	// Constructor
	Time(void);

	// Destructor
	~Time(void);

public:

	//////////////////////////////////////////////////
	// Accessors:
	unsigned int TotalFrames(void) const { return totalFrames; }
	unsigned int FPS(void) const { return fps; }
	float DeltaTime(void) const { return deltaTime; }

	// Call the Update function every frame so deltaTime is updated properly
	void Update( void );

	static Time& GetInstance(void);	// Returns an reference to this singleton.
};

